package com.lujianfei.recyclerview;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.lujianfei.recyclerview.recyclerview_horizontal.RecyclerViewHorizontalActivity;
import com.lujianfei.recyclerview.recyclerview_multi_type.RecyclerViewMultiTypeActivity;
import com.lujianfei.recyclerview.recyclerview_vertical.LoadMoreActivity;
import com.lujianfei.recyclerview.recyclerview_vertical.LongClickActivity;
import com.lujianfei.recyclerview.recyclerview_vertical.ScrollHideSearchActivity;
import com.lujianfei.recyclerview.recyclerview_vertical.ScrollHideBottomActivity;
import com.lujianfei.recyclerview.recyclerview_vertical.VerticalActivity;
import com.lujianfei.recyclerview.recyclerview_vertical.ViewPagerVerticalActivity;
import com.lujianfei.recyclerview.recyclerview_vertical.WaterfallActivity;
import com.lujianfei.recyclerview.recyclerview_multi_type.WaterfallBannerActivity;
import com.lujianfei.recyclerview.recyclerview_multi_type.WaterfallBannerSpacingActivity;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.btn_recyclerview_vertical).setOnClickListener(this);
        findViewById(R.id.btn_recyclerview_horizontal).setOnClickListener(this);
        findViewById(R.id.btn_recyclerview_multi_type).setOnClickListener(this);
        findViewById(R.id.btn_recyclerview_longclick).setOnClickListener(this);
        findViewById(R.id.btn_recyclerview_loadmore).setOnClickListener(this);
        findViewById(R.id.btn_waterfall).setOnClickListener(this);
        findViewById(R.id.btn_waterfall_headview).setOnClickListener(this);
        findViewById(R.id.btn_waterfall_spacing).setOnClickListener(this);
        findViewById(R.id.btn_scroll_bottom_hide).setOnClickListener(this);
        findViewById(R.id.btn_scroll_title_hide).setOnClickListener(this);
        findViewById(R.id.btn_vertical_viewpager).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_recyclerview_vertical:{
                startActivity(new Intent(this, VerticalActivity.class));
            }
            break;
            case R.id.btn_recyclerview_horizontal:{
                startActivity(new Intent(this,RecyclerViewHorizontalActivity.class));
            }
            break;
            case R.id.btn_recyclerview_multi_type:{
                startActivity(new Intent(this,RecyclerViewMultiTypeActivity.class));
            }
            break;
            case R.id.btn_recyclerview_longclick:{
                startActivity(new Intent(this, LongClickActivity.class));
            }
            break;
            case R.id.btn_recyclerview_loadmore:{
                startActivity(new Intent(this,LoadMoreActivity.class));
            }
            break;
            case R.id.btn_waterfall:{
                startActivity(new Intent(this, WaterfallActivity.class));
            }
            break;
            case R.id.btn_waterfall_headview:{
                startActivity(new Intent(this, WaterfallBannerActivity.class));
            }
            break;
            case R.id.btn_waterfall_spacing:{
                startActivity(new Intent(this, WaterfallBannerSpacingActivity.class));
            }
            break;
            case R.id.btn_scroll_bottom_hide:{
                startActivity(new Intent(this, ScrollHideBottomActivity.class));
            }
            break;
            case R.id.btn_scroll_title_hide:{
                startActivity(new Intent(this, ScrollHideSearchActivity.class));
            }
            break;
            case R.id.btn_vertical_viewpager:{
                startActivity(new Intent(this, ViewPagerVerticalActivity.class));
            }
            break;
        }
    }
}
